import { useEffect, useRef, useState } from 'react';

import {
  sampleSize, //获得随机数
  uniq, //去重
  sortedUniq,//去重并排序
  take, //从0开始获得指定数组
  takeRight,
  max,
  min,
  lastIndexOf,
  orderBy,//排序
  slice//裁剪数组
} from "lodash"
import IndexLocation from './IndexLocation';
import { useModel } from '@umijs/max';

interface Props{
  list: [
    {
      bollStr: [],//球号码
      errorCount: number,//杀错数量
      nextRedBallRemoveNumber: []//下期要杀的号码
    }
  ]
}

// 脚手架示例组件
export default({
  list
}:Props)=>{
  return (
    <>
    <table>
      <thead>
        <tr>
          <td>号码</td>
          <td>杀错数量</td>
          <td>下期杀号</td>
        </tr>
      </thead>
      <tbody>
        {
          list.map((item, index)=>{
            
            return <tr key={index}>
                    <td>{item.bollStr.join(" ")}</td>
                    <td>上期杀错 {item.errorCount} 球</td>
                    <td>{item.nextRedBallRemoveNumber.join(" ")}</td>
                  </tr>
          })
        }
        </tbody>
      </table>
    </>
  );
}